using B.S.NewMedical.Api.Read.DTOS.Department;
using B.S.NewMedical.ErrorCode;
using MediatR;
using System.Collections.Generic;

namespace B.S.NewMedical.Api.Read.Application.Command.ContentManagement.Department
{
    /// <summary>
    /// 获取二级科室列表命令（根据父级科室ID查询）
    /// </summary>
    public class GetSecondLevelDepartmentsCommand : IRequest<ApiPageing<DepartmentDisplayDto>>
    {
        /// <summary>
        /// 父级科室ID
        /// </summary>
        public int ParentDepartmentId { get; set; }

        /// <summary>
        /// 查询条件
        /// </summary>
        public DepartmentQueryDto QueryDto { get; set; }

        public GetSecondLevelDepartmentsCommand(int parentDepartmentId, DepartmentQueryDto queryDto)
        {
            ParentDepartmentId = parentDepartmentId;
            QueryDto = queryDto ?? new DepartmentQueryDto();
            // 设置父级科室ID
            QueryDto.ParetId = parentDepartmentId;
        }
    }
}